package com.jp.mcpserver.service;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Service;

@Service
public class WeatherService {

    @Tool(description = "获取城市天气状况")
    public String getWeather(@ToolParam(description = "城市") String city){
        System.out.println(city+"的天气信息：气温20摄氏度，微风");
        return city+"的天气信息：气温20摄氏度，微风";
    }
}
